/**
 * User: alesj
 * Date: 2005.6.1
 * Time: 15:33:28
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.alesj.newsfeed.data;

import java.io.Serializable;
import java.util.Set;

import com.generalynx.common.data.ADEData;
import com.generalynx.common.resources.Resources;


public class Account extends ADEData implements Serializable {

    private static final long serialVersionUID = 1L;

    private int id;
    private String name;
    private String email;
    private Set messages;

    private String formatString(char p, char s) {
        return getName() + ' ' + p + getEmail() + s;
    }

    public String getAddLabel() {
        return Resources.getString(Resources.ACCOUNT);
    }

    protected String getNameLabel() {
        return formatString('[', ']');
    }

    public String toEmailFormat() {
        return formatString('<', '>');
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Set getMessages() {
        return messages;
    }

    public void setMessages(Set messages) {
        this.messages = messages;
    }
}
